package ritesh;

class MyThread extends Thread{
	MyThread(String s){
		super(s);
		start();
		}
	public void run(){
		for(int i=0;i<3;i++){
		Thread cur=Thread.currentThread();
		cur.setPriority(Thread.MIN_PRIORITY);
		int p=cur.getPriority();
		System.out.println("Thread Name :"+Thread.currentThread().getName());
		System.out.println("Thread Priority :"+cur);
		
		try{
			Thread.sleep(1000);
			}catch(Exception e){}
		}
		}
}


public class ThreadExample2{
	public static void main(String args[]){
	System.out.println("Thread Name :"+Thread.currentThread().getName());
	MyThread m1=new MyThread("My Thread 1");
	MyThread m2=new MyThread("My Thread 2");
	}
	}
